﻿function(add_win32_execute subproject_name)
    # 支持DPI感知 -- 嵌入清单
    add_executable(${subproject_name} ${ARGN} ${CMAKE_CURRENT_SOURCE_DIR}/app.manifest)
    # 设置子系统：/subsystem:windows
    set_target_properties(${subproject_name} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
    # 定义UNICODE和_UNICODE
    target_compile_definitions(${subproject_name} PRIVATE UNICODE _UNICODE _WIN32_WINNT=0x0601)
endfunction()


function(add_shared_library subproject_name)
    add_library(${subproject_name} SHARED ${ARGN})
    target_compile_definitions(${subproject_name} PRIVATE UNICODE _UNICODE _WIN32_WINNT=0x0601)
endfunction()
